<html>
	
	<head>
	<link rel="stylesheet" type="text/css" href="doc.css" />
	<style type="text/css">
	.auto-style1 {
		border-style: solid;
		border-width: 1px;
		margin-bottom: 0px;
	}
	.auto-style2 {
	font-size: large;
	margin-left: 40px;
}
	.auto-style3 {
	font-size: large;
}
	</style>
	<script type="text/javascript" language="JavaScript"><!--
	function To(url) {
	location.replace(url);
	}
	//--></script>
	</head>

	<body>
		<h1><u>Test Plan</u></h1>
		<h2>Overall Testing Philosophy</h2>
		<p>In order to ensure full operation of the current code, test scripts 
		have been designed to catch any potential errors. Using a somewhat 
		exhaustive testing philosophy, we have created five separate test programs that check if our code is able to 
		break down the program and place the label, operation, function etc. in 
		the correct columns; and be able to parse valid and invalid FFA source code. 
		These test scripts are broken down as follows:</p>
		<ol>
			<li>Check all valid combinations of label, operation, function, 
			rlabel and comments</li>
			<li>Check for leading zeros and operations and functions with mixed 
			cases</li>
			<li>Check for labels with the same name as either operations or 
			functions</li>
			<li>Check for the extreme values and special characters</li>
			<li>Make sure all FFA syntax and other possible errors are found and the correct error message is 
			displayed</li>
			<li>Since all the operations and functions are tested in 1-4. Have 
			unit tests to test for directives (without errors).</li>
			<li>Unit tests to check for all possible errors for each directive.</li>
			<li>Have upto 5 test programs that have everything in them 
			(Integration testing- not comprehensive).The instrctions are with 
			and without errors. These programs are there to make sure that 
			everything works as desired.</li>
			<li>Test script included in the midterm</li>
			<li>Take the object file from the output from fully functioning test programs 
			(no errors and linked extrn/entry variables) and use them as input for the linker. Make sure the linker works as 
			expected.</li>
			<li>Take in the output of the linker and use it in the simulator to 
			make sure the simulator works as expected.</li>
			<li>Use a sample load file which contains multiple syntax errors to 
			test all simulator syntax error messages.</li>
			<li>Test the simulator for overflow by changing the header record in 
			a load file to start at zero and have a length out of bounds.</li>
		</ol>
		<h2>Table of Contents</h2>
		<table class="auto-style1">
			<tr>
				<td style="width: 113px">
					<a href="javascript:To('#comb_test')">Combination Test</a>
				</td>
				<td style="width: 94px">
					<a href="javascript:To('#case_test')">Case Test</a>
				</td>
				<td style="width: 96px">
					<a href="javascript:To('#label_test')">Label Test</a>
				</td>
				<td style="width: 115px">
					<a href="javascript:To('#value_test')">Value Test</a>
				</td>
				<td style="width: 114px">
					<a href="javascript:To('#error_test')">Error_Test</a></td>
				<td style="width: 71px">
					<a href="javascript:To('#Dat_Test')">Dat_Test</a></td>
			</tr>
			<tr>
				<td style="width: 113px">
					<a href="javascript:To('#Dat_Errors')">Dat_Errors</a></td>
				<td style="width: 94px">
					<a href="javascript:To('#Equate_Test')">Equate_Test</a></td>
				<td style="width: 96px">
					<a href="javascript:To('#Equate_Errors')">Equate_Errors</a></td>
				<td style="width: 115px">
					<a href="javascript:To('#Extrn_Entry_Test')">Extrn_Entry_Test</a></td>
				<td style="width: 114px">
					<a href="javascript:To('#Extrn_Entry_Errors')">Extrn_Entry_Test</a></td>
				<td style="width: 71px">
					<a href="javascript:To('#Adc_Test')">Adc_Test</a></td>
			</tr>
			<tr>
				<td style="width: 113px">
					<a href="javascript:To('#Adc_Errors')">Adc_Errors</a></td>
				<td style="width: 94px">
					<a href="javascript:To('#Midterm_Test')">Midterm_Test</a></td>
				<td style="width: 96px">
					<a href="javascript:To('#nop_reset_test')">Nop_Reset_Test</a></td>
				<td style="width: 115px">
					<a href="javascript:To('#nop_reset_errors')">Nop_Reset_Errors</a></td>
				<td style="width: 114px">
					<a href="javascript:To('#test1')">Test1</a></td>
				<td style="width: 71px">
					<a href="javascript:To('#test2')">Test2</a></td>
			</tr>
			<tr>
				<td style="width: 113px">
					<a href="javascript:To('#test3')">Test3</a></td>
				<td style="width: 94px">
					<a href="javascript:To('#sim_load')">Simulator Load file</a></td>
				<td style="width: 96px">
					<a href="javascript:To('#sim_err')">Simulator Error file</a></td>
				<td style="width: 115px">
					<a href="javascript:To('#sim_over')">Simulator Overflow file</a></td>
				<td style="width: 114px">
					&nbsp;</td>
				<td style="width: 71px">
					&nbsp;</td>
			</tr>
		</table>
		
		<p class="auto-style2"><a href="test_table.html">Testing Results</a></p>
		<h2>Test Programs</h2>
		<p>
		To make the operation, function and symbol table, our code inputs text from the test programs line by line and then splits up the program in words and assigns the 
		individual words to string variables such as label, operation, function etc. respectively. So the test programs will be written in such a way that we not only check 
		for all valid variations of the functions but also check to see if comments and labels don't affect parsing and are assigned to the right string.</p>
		
		<ul>
		<li><a name="comb_test">Combination_Test</a>: This test checks to see if all the valid combinations of label, operation, instruction, rlabel and comments parse correctly. 
		This program will have all functions of Cntl and Stack operations. The test program will have lines with</li>
			<ul>
				<li>Labels, operation, function, rlabel and comments.</li>
				<li>No label or comments.</li>
				<li>Label and no comments.</li>
				<li>Comments but no label.</li>
				<li>And comments only.</li>
			</ul>
		<font size=5>
		<a href="../test scripts/Combinations_Test.txt">Combination Test(.txt)</a></font><br>
		<a href="../test scripts/comb_out.txt"><font size=5>Combination Test Output(.txt)</font></a>
			<br><br>
			<li><a name="case_test">Case_Test</a>: This test checks to see if numbers with leading zeros parse correctly and 
		checks if the operations and functions are case insensitive. This test program will check 
		for all functions of Soper operation. The test programs will contain operations and functions which are</li>
			<ul>
				<li>All upper case.</li>
				<li>All lower case.</li>
				<li>Mixed case.</li>
			</ul>
			<font size=5><a href="../test scripts/Case_Test.txt">Case Test(.txt)</a></font><br>
			<a href="../test scripts/case_out.txt"><font size=5>Case Test Output(.txt)</font></a>
			<br><br>
			<li><a name="label_test">Label_Test</a>: This test program will test to see if labels with the same name as operations 
		and functions parse correctly. This test program will test all the functions in the 
		Jump operation. The labels will have names that are exactly the same as</li>
			<ul>
				<li>Operations (Stack, Cntl, Jump, Soper and Moper)</li>
				<li>Functions (Add, Push, Halt etc.)</li>
			</ul>
			<font size=5><a href="../test scripts/Label_Test.txt">Label Test(.txt)</a></font><br>
			<a href="../test scripts/label_out.txt"><font size=5>Label Test Output(.txt)</font></a><br>
			<br>
			<li><a name="value_test">Value_Test</a>: This test program checks to see if the extreme values of Hex, Binary and 
		Integers parse correctly. The program also checks if special characters for C= parse correctly. 
		This test program implements all the functions of Moper operation.</li>
			<font size=5><a href="../test scripts/Value_Test.txt">Value Test(.txt)</a></font><br>
			<font size=5><a href="../test scripts/value_out.txt">Value Test Output(.txt)</a></font>
			<br><br>
			<li style="height: 120px"><a name="error_test">Error_Test</a>: This test program makes sure various syntax and other errors are found 
		properly. It will also test that the correct error message is displayed. The assembler should continue parsing 
		all correct lines of code even after many error messages have been displayed on previous lines of code.<br>
			<a href="../test%20scripts/Error_Test.txt"><font size=5>Error Test(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/Error_Out.txt">Error Test Output(.txt)</a></font><br>
		<br>
			<li style="height: 168px"><a name="Dat_Test">Dat_Test</a> and 
			<a name="Dat_Errors">Dat_Errors</a>: This test program makes sure various syntax and other errors are found 
		properly with the dat directive. It will also test that the correct error message is displayed. The assembler should continue parsing 
		all correct lines of code even after many error messages have been displayed on previous lines of code.<br>
			<a href="../test%20scripts/SP2/dat_test.txt"><font size=5>Dat Test(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Dat_Test_Output.txt">Dat Test Output(.txt)</a></font><br>
			<a href="../test%20scripts/SP2/dat_errors.txt"><font size=5>Dat Errors(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Dat_Errors_Output.txt">Dat Errors Output(.txt)</a></font><br>
		<br>
			<li style="height: 168px"><a name="Equate_Test">Equate_Test</a> and
			<a name="Equate_Errors">Equate_Errors</a>: This test program makes sure various syntax and other errors are found 
		properly with equ and eque. It will also test that the correct error message is displayed. The assembler should continue parsing 
		all correct lines of code even after many error messages have been displayed on previous lines of code.<br>
			<a href="../test%20scripts/SP2/equate_test.txt"><font size=5>Equate Test(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Equate_Test_Output.txt">
			Equate Test Output(.txt)</a></font><br>
			<a href="../test%20scripts/SP2/equate_errors.txt"><font size=5>
			Equate Errors(.txt)</font></a><br><font size=5>
			<a href="../test%20scripts/SP2/Equate_Errors_Output.txt">Equate Errors Output(.txt)</a></font><br>
		
		<br>
			<li style="height: 168px"><a name="Extrn_Entry_Test">Extrn_Entry_Test</a> and
			<a name="Extrn_Entry_Errors">Extrn_Entry_Errors</a>: This test program makes sure various syntax and other errors are found 
		properly with extrn. It will also test that the correct error message is displayed. The assembler should continue parsing 
		all correct lines of code even after many error messages have been displayed on previous lines of code.<br>
			<a href="../test%20scripts/SP2/extrn_entry_test.txt"><font size=5>
			Extrn Entry Test(.txt)</font></a><br><font size=5>
			<a href="../test%20scripts/SP2/extrn_entry_test_Output.txt">Extrn 
			Entry Test Output(.txt)</a></font><br>
			<a href="../test%20scripts/SP2/extrn_entry_errors.txt"><font size=5>
			Extrn Entry Errors(.txt)</font></a><br><font size=5>
			<a href="../test%20scripts/SP2/extrn_entry_errors_Output.txt">Extrn 
			Entry Errors Output(.txt)</a></font><br>
		<br>
			<li style="height: 168px"><a name="Adc_Test">Adc_Test</a> and
			<a name="Adc_Errors">Adc_Errors</a>: This test program makes sure various syntax and other errors are found 
		properly with adc and adce. It will also test that the correct error message is displayed. The assembler should continue parsing 
		all correct lines of code even after many error messages have been displayed on previous lines of code.<br>
			<a href="../test%20scripts/SP2/Adc_Test.txt"><font size=5>Adc Test(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Adc_Test_Output.txt">Adc Test Output(.txt)</a></font><br>
			<a href="../test%20scripts/SP2/adc_errors.txt"><font size=5>Adc Errors(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Adc_Errors_Output.txt">
			Adc Errors Output(.txt)</a></font><br><br>
			<li style="height: 100px">
			<a name="Midterm_Test">Midterm_Test</a>: Test script that was included on the midterm, tests 
			multiple instructions and functions with the correct op code 
			included, along with correct &quot;a,r,m&quot; information.<br>
			<a href="../test%20scripts/SP2/midterm_program.txt"><font size=5>
			Midterm Test(.txt)</font></a><br>
			<font size=5>
			<a href="../test%20scripts/SP2/Midterm_Program_Output.txt">
			Midterm Test Output(.txt)</a></font>
			<li style="height: 170px"><a name="Nop_Reset_Test">Nop_Reset_Test</a> and
			<a name="Nop_Reset_Errors">Nop_Reset_Errors</a>: This test program makes sure various syntax and 
			other errors are found properly with nop and reset directives. It 
			will also test that the correct error message is displayed. The 
			assembler should continue parsing all correct lines of code even 
			after many error messages have been displayed on previous lines of 
			code.<br>
			<a href="../test%20scripts/SP2/nop_reset_test.txt"><font size=5>
			Nop_Reset_Test(.txt)</font></a><br>
			<font size=5>
			<a href="../test%20scripts/SP2/Nop_Reset_Test_Output.txt">
			Nop_Reset_Test_Output(.txt)</a></font><br>
			<a href="../test%20scripts/SP2/nop_reset_errors.txt"><font size=5>Nop_Reset_Errors(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Nop_Reset_Errors_Output.txt">
			Nop Reset Errors Output(.txt)</a></font><li style="height: 100px">
			<a name="Test1">Test1</a>: Test script that contains a mix of directives, functions and 
			operations without any errors in the instructions. Intended to be 
			used for integration testing. Whatever is defined as extrn in test1 
			is defined in test2 and test3 as enrty variables. object files from 
			test1, test2 and test3 are run together as input for the linker to 
			make sure the modification, address, location and value computations 
			are done correctly by the linker.<br>
			<a href="../test%20scripts/SP2/test1.txt"><font size=5>
			Test1(.txt)</font></a><br>
			<font size=5>
			<a href="../test%20scripts/SP2/Test1_Output.txt">
			Test1 Output(.txt)</a></font>
			<li style="height: 100px"><a name="Test2">Test2</a>: Test script that contains a mix of directives, functions and 
			operations with a few errors in the instructions. Intended to be 
			used for integration testing. Whatever is defined as extrn in test2 
			is defined in test1 and test3 as enrty variables. object files from 
			test1, test2 and test3 are run together as input for the linker to 
			make sure the modification, address, location and value computations 
			are done correctly by the linker.<br>
			<a href="../test%20scripts/SP2/test2.txt"><font size=5>Test2(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Test2_Output.txt">Test2 Output(.txt)</a></font>
			</li>
			<li><a name="Test3">Test3</a>: Test script that contains a mix of directives, functions and 
			operations with a few errors in the instructions. Intended to be 
			used for integration testing. Whatever is defined as extrn in test3 
			is defined in test2 and test1 as enrty variables. object files from 
			test1, test2 and test3 are run together as input for the linker to 
			make sure the modification, address, location and value computations 
			are done correctly by the linker.<br>
			<a href="../test%20scripts/SP2/test3.txt"><font size=5>Test3(.txt)</font></a><br>
			<font size=5><a href="../test%20scripts/SP2/Test3_Output.txt">Test3 Output(.txt)</a></font>
			</li>
			<li>Linker was tested by running object files from test1,test2 and 
			test3 together. The output from the linker is given in the following 
			link.<br>
			<font size=5><a href="../test%20scripts/SP2/linker_output.txt">Linker Output(.txt)</a></font>

			</li>
			<li><a name="sim_load"></a>Use the load file created in the Linker Output to test the 
			simulator.<br><span class="auto-style3">
			<a href="../test%20scripts/SP4/Load.txt">Load File(.txt)</a><br>
			Simulator Output(.txt)</span></li>
			<li><a name="sim_err">Simulator Syntax Error Check</a>: A load file with errors in every 
			field of the records to test that all errors are found properly.<br>
			<span class="auto-style3">
			<a href="../test%20scripts/SP4/Load_Errors.txt">Load_Errors(.txt)</a><br>
			Load_Errors_Out(.txt)</span></li>
			<li><a name="sim_over">Simulator Overflow Check</a>: A load file with a start address of 
			0000 and length out of bounds. Should give a fatal error.<br>
			<span class="auto-style3">
			<a href="../test%20scripts/SP4/Load_Overflow.txt">
			Load_Overflow(.txt)</a><br>
			<a href="../test%20scripts/SP4/Load_Overflow_Out.txt">Load_Overflow_Out(.txt)</a></span></li>
			</ul>
		<p>&nbsp;</p>
		<ul>
			<li style="height: 10px">
			<p>Note: In all these programs we check for Start and End directives
			</p>
			</ul>
	</body>
</html>
